package com.cat.dataStructure03;

/**
 * @author 曲大人的喵
 * @description https://leetcode.cn/problems/construct-the-longest-new-string/
 * @create 2025/11/18 18:40
 * @since JDK17
 */

public class Solution86 {
    public int longestString(int x, int y, int z) {
        int min = Math.min(x, y);
        int a = x > min ? min + 1 : x;
        int b = y > min ? min + 1 : y;
        return (z + a + b) * 2;
    }
}
